/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/*
 * Castor.java
 *
 * Created on 29-nov-2011, 15:23:28
 */
package Castor;

import Comun.clsSaicFrame;

/**
 *
 * @author luisramirezmartinez
 */
public class Castor extends clsSaicFrame {

    int contador = 0;
    /** Creates new form Castor */
    public Castor() {
        initComponents();
    }

    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        panelImage1 = new org.edisoncor.gui.panel.PanelImage();
        panelRound1 = new Comun.PanelRound();
        jLabel1 = new javax.swing.JLabel();
        buttonSeven2 = new org.edisoncor.gui.button.ButtonSeven();
        buttonSeven1 = new org.edisoncor.gui.button.ButtonSeven();

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);

        panelImage1.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Castor/castor-frente copia.png"))); // NOI18N

        org.jdesktop.layout.GroupLayout panelImage1Layout = new org.jdesktop.layout.GroupLayout(panelImage1);
        panelImage1.setLayout(panelImage1Layout);
        panelImage1Layout.setHorizontalGroup(
            panelImage1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(0, 135, Short.MAX_VALUE)
        );
        panelImage1Layout.setVerticalGroup(
            panelImage1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(0, 164, Short.MAX_VALUE)
        );

        jLabel1.setForeground(new java.awt.Color(255, 255, 255));
        jLabel1.setText("Hola soy castorsin... y sere tu ayudante!!!");
        jLabel1.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);

        buttonSeven2.setText(">");
        buttonSeven2.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                buttonSeven2ActionPerformed(evt);
            }
        });

        buttonSeven1.setText("<");
        buttonSeven1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                buttonSeven1ActionPerformed(evt);
            }
        });

        org.jdesktop.layout.GroupLayout panelRound1Layout = new org.jdesktop.layout.GroupLayout(panelRound1);
        panelRound1.setLayout(panelRound1Layout);
        panelRound1Layout.setHorizontalGroup(
            panelRound1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(panelRound1Layout.createSequentialGroup()
                .add(panelRound1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                    .add(panelRound1Layout.createSequentialGroup()
                        .add(291, 291, 291)
                        .add(buttonSeven1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 28, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                        .add(buttonSeven2, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 28, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
                    .add(panelRound1Layout.createSequentialGroup()
                        .addContainerGap()
                        .add(jLabel1, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 333, Short.MAX_VALUE)))
                .addContainerGap())
        );
        panelRound1Layout.setVerticalGroup(
            panelRound1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(org.jdesktop.layout.GroupLayout.TRAILING, panelRound1Layout.createSequentialGroup()
                .addContainerGap()
                .add(jLabel1)
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED, 50, Short.MAX_VALUE)
                .add(panelRound1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
                    .add(buttonSeven2, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 25, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                    .add(buttonSeven1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 24, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
                .addContainerGap())
        );

        org.jdesktop.layout.GroupLayout layout = new org.jdesktop.layout.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(layout.createSequentialGroup()
                .add(11, 11, 11)
                .add(panelImage1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(panelRound1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(layout.createSequentialGroup()
                .add(10, 10, 10)
                .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                    .add(panelRound1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                    .add(panelImage1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
                .addContainerGap(org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        pack();
    }// </editor-fold>//GEN-END:initComponents

private void tips(){
    switch (contador) {
            case  0:
                this.jLabel1.setText("<html>Sistema de Administración de Información Clinica - SAIC</html>");
                break;
            case  1:
                this.jLabel1.setText("<html>El botón 'Nuevo' <br>permite agregar nuevos registros :)</html>");
                break;
            case  2:
                this.jLabel1.setText("<html>El botón 'Guardar' <br>ingresa un nuevo registro en la base de datos</html>");
                break;
            case  3:
                this.jLabel1.setText("<html>El botón 'Buscar' abre una nueva <br>ventana con una tabla donde se encuentran los registros</html>");
                break;
            case  4:
                this.jLabel1.setText("<html>El botón 'Modificar' permite editar <br>la información de un registro ya capturado</html>");
                break;
            case  5:
                this.jLabel1.setText("<html>El botón 'Cancelar' <br>detiene las acciones que se esten realizando</html>");
                break;
            case  6:
                this.jLabel1.setText("<html>Los botones de navegacion se encuentran en cada pantalla <br> Estas te permiten desplazarte entre los registros </html>");
                break;
            case  7:
                this.jLabel1.setText("<html>Come frutas y verduras!!</html>");
                break;
            case  8:
                this.jLabel1.setText("<html>Recuerda que el SAIC realiza los reportes necesarios para una buena docutacion</html>");
                break;
            case  9:
                this.jLabel1.setText("<html>Si ocupo mucho espacio vuelve a precionar el botón de donde me llamaste <br> y llamame cuando me nesecites de nuevo</html>");
                break;
                
            default:
                System.out.println(" ");
        }
}
private void buttonSeven1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_buttonSeven1ActionPerformed
    if(contador >= 0){
        tips();
        contador--;
    }else if (contador == -1){
        contador = 9;
        tips();
    }else
        contador = 0;
    this.pack();

}//GEN-LAST:event_buttonSeven1ActionPerformed

private void buttonSeven2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_buttonSeven2ActionPerformed
    if(contador <= 10){
        tips();
        contador++;
    }else if (contador == 11){
        contador = 0;
        tips();
    }else
        contador = 0;
    System.out.println(contador);
    this.pack();
}//GEN-LAST:event_buttonSeven2ActionPerformed

    /**
     * @param args the command line arguments
     */
    public static void main(String args[]) {
       

        /* Create and display the form */
        java.awt.EventQueue.invokeLater(new Runnable() {

            @Override
            public void run() {
                new Castor().setVisible(true);
            }
        });
    }
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private org.edisoncor.gui.button.ButtonSeven buttonSeven1;
    private org.edisoncor.gui.button.ButtonSeven buttonSeven2;
    private javax.swing.JLabel jLabel1;
    private org.edisoncor.gui.panel.PanelImage panelImage1;
    private Comun.PanelRound panelRound1;
    // End of variables declaration//GEN-END:variables
}
